package com.wuage.interfaces.account.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * @author Shynin
 * @version 1.0
 * @date 2020-09-17 23:26
 */
@Data
@ApiModel("用户忘记密码对象")
public class AccountForgetPasswordDO {
    @Pattern(regexp = "^((13[0-9])|(14[0,1,4-9])|(15[0-3,5-9])|(16[2,5,6,7])|(17[0-8])|(18[0-9])|(19[0-3,5-9]))\\d{8}$", message = "请输入正确手机号")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    @Length(min = 4, max = 4, message = "验证码只能是4位")
    @ApiModelProperty(value = "验证码", required = true)
    private String authCode;

    @Length(min = 6, max = 16, message = "密码必须在6到16位之间")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @Length(min = 6, max = 16, message = "确认密码必须在6到16位之间")
    @ApiModelProperty(value = "确认密码", required = true)
    private String confirmPassword;
}
